package com.orphan.marketBack.service.impl;

import com.orphan.marketBack.dao.SupplierOutGoodsMapper;
import com.orphan.marketBack.dao.SupplierOutMapper;
import com.orphan.marketBack.po.SupplierOut;
import com.orphan.marketBack.po.SupplierOutGoods;
import com.orphan.marketBack.service.SupplierOutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SupplierOutServiceImpl implements SupplierOutService {
    @Autowired
    private SupplierOutMapper supplierOutMapper;
    @Autowired
    private SupplierOutGoodsMapper supplierOutGoodsMapper;


    @Override
    public boolean insert(SupplierOut supplierOut, SupplierOutGoods entity) {
        int i1 = supplierOutMapper.insert(supplierOut);
        int i2 = supplierOutGoodsMapper.insert(entity);

        if(i1 > 0 && i2 > 0){
            return true;
        }else{
            return false;
        }
    }
}
